<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div class="a c b" style="width: 200px;height:200px;background-color: #aef;"></div>
  <script>
    let div = document.querySelector('div')
    //为 div 元素添加一个类名
    // div.className = 'abc';
    // div.classList.add('abc');

    //移除元素身上的类名
    // div.classList.remove('b');

    //测试 toggle
    // div.classList.toggle('b');

    //测试 contains 含有
    // console.log(div.classList.contains('b'));
  </script>
</body>
</html>